package com.haina.shop.controller.index;

import com.haina.shop.result.ServiceResult;
import com.haina.shop.service.ProdService1;
import com.haina.shop.vo.InfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController

public class ProductInfo {

    @Autowired
    private ProdService1 prodService;

    @GetMapping("/prod/prodInfo")
    public ServiceResult getProductInfo(@RequestParam("prodId") Long prodId){

        InfoVo info = prodService.getInfo(prodId);
        return ServiceResult.LoginSuccess(info);
    }

}
